package com.hospital.register.model.core;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hospital.register.model.base.BaseEntity;
import com.hospital.register.validation.groups.InsertValidation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * HospitalSet
 * </p>
 *
 * @author qy
 */
@Data
@ApiModel(description = "医院设置")
@TableName("hospital_set")
public class HospitalSet extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "医院名称")
    @TableField("hosname")
    @NotBlank(groups = InsertValidation.class, message = "医院名称不可为空")
    private String hosname;

    @ApiModelProperty(value = "医院编号")
    @TableField("hoscode")
    @NotBlank(groups = InsertValidation.class, message = "医院编号不可为空")
    private String hoscode;

    @ApiModelProperty(value = "api基础路径")
    @TableField("api_url")
    @NotBlank(groups = InsertValidation.class, message = "api 基础路径不可为空")
    private String apiUrl;

    @ApiModelProperty(value = "签名秘钥")
    @TableField("sign_key")
    private String signKey;

    @ApiModelProperty(value = "联系人姓名")
    @TableField("contacts_name")
    @NotBlank(groups = InsertValidation.class, message = "联系人姓名不可为空")
    private String contactsName;

    @ApiModelProperty(value = "联系人手机")
    @TableField("contacts_phone")
    @NotBlank(groups = InsertValidation.class, message = "联系人手机不可为空")
    private String contactsPhone;

    @ApiModelProperty(value = "状态", notes = "0 禁用，1 启用")
    @TableField("status")
    @Range(min = 0L, max = 1L, groups = InsertValidation.class, message = "状态非法")
    private Byte status;

}

